package com.atguigu.staservice.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduledTask {

    //（0/5 * * * * ？）：每隔5秒执行一次
    @Scheduled(cron = "0/5 * * * * ?")//指定cron表达式规则
    public void task01(){
        System.out.println("=========我执行了");

    }
}
